//
//  ParseOperation.h
//  iPhoneDev02
//
//  Created by smu on 11-7-18.
//  Copyright 2011年 duk. All rights reserved.
//

//extern关键字，告诉编译器这个变量或者函数在其他文件里已经被定义了
extern NSString *kAddEarthquakesNotif;
extern NSString *kEarthquakeResultsKey;

extern NSString *kEarthquakesErrorNotif;
extern NSString *kEarthquakesMsgErrorKey;

@class Earthquake;

@interface ParseOperation : NSOperation {
    NSData *earthquakeData;
    
@private
    NSDateFormatter *dateFormatter;
    
    // these variables are used during parsing
    Earthquake *currentEarthquakeObject;
    NSMutableArray *currentParseBatch;
    NSMutableString *currentParsedCharacterData;
    
    BOOL accumulatingParsedCharacterData;
    BOOL didAbortParsing;
    NSUInteger parsedEarthquakesCounter;
}

@property (copy, readonly) NSData *earthquakeData;
@property (nonatomic, retain) Earthquake *currentEarthquakeObject;
@property (nonatomic, retain) NSMutableArray *currentParseBatch;
@property (nonatomic, retain) NSMutableString *currentParsedCharacterData;

@end
